package com.example.music.service.impl;

import com.example.music.domain.User;
import com.example.music.mapper.UserMapper;
import com.example.music.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements IUserService {
    @Autowired
    private UserMapper userMapper;
    public List<User> getUsers(){
        return userMapper.getUsers();
    }

    public User selectUserById(Long id){
        return userMapper.selectUserById(id);
    }

    public int insertUser(User user){
        return userMapper.insertUser(user);
    }

    public int updateUser(User user){
        return userMapper.updateUser(user);
    }

    public int deleteUserById(Long id){
        return userMapper.deleteUserById(id);
    }

}
